package starcoast.bocai.com.starcoast.activitys;

import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import butterknife.Bind;
import butterknife.ButterKnife;
import starcoast.bocai.com.starcoast.R;
import starcoast.bocai.com.starcoast.adapter.SearchGirdAdapter;
import starcoast.bocai.com.starcoast.common.BaseActivity;
import starcoast.bocai.com.starcoast.view.MyGridView;

/**
 * Created by admin on 2016/6/7.
 */
public class SearchActivity extends BaseActivity implements View.OnClickListener{
    @Bind(R.id.search_gv)
    MyGridView search_gv;
    @Bind(R.id.search_back)
    ImageView search_back;
    @Bind(R.id.search)
    TextView search;
    SearchGirdAdapter adapter;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_search);
        ButterKnife.bind(this);
        adapter = new SearchGirdAdapter(this);
        search_gv.setAdapter(adapter);
        search_back.setOnClickListener(this);
        search.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.search_back:
                finish();
                break;
            case R.id.search:
                startActivity(new Intent(SearchActivity.this,SearchResultActivity.class));
        }
    }
}
